package com.cayden.components.dubbo.shutdown;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;

/**
 * @author cayden
 * @date 2021-10-27 11:27
 */
public class DubboShutdownApplicationListener implements ApplicationListener<ContextClosedEvent> {

    @Override
    public void onApplicationEvent(ContextClosedEvent event) {
        new DubboShutdownHook().run();
    }
}
